<!DOCTYPE html>

<html lang="en">
<head>
	<meta charset="utf-8">
	<title>najaxjs Class: Nx</title>

	<!--[if lt IE 9]>
	<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">

	<link type="text/css" rel="stylesheet" href="styles/site.yeti.css">

</head>

<body>

<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
	<div class="navbar-header">
		<a class="navbar-brand" href="index.html">najaxjs</a>
		<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
        </button>
	</div>
	<div class="navbar-collapse collapse" id="topNavigation">
		<ul class="nav navbar-nav">
			
			<li class="dropdown">
				<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="$najax.html">$najax</a></li><li><a href="$najax.define.html">$najax.define</a></li><li><a href="$najax.history.html">$najax.history</a></li><li><a href="$najax@class.html">$najax@class</a></li><li><a href="$najax@ex.html">$najax@ex</a></li><li><a href="$najax@helper.html">$najax@helper</a></li><li><a href="$najax@read.html">$najax@read</a></li><li><a href="$najax@rlk.html">$najax@rlk</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="Linker.html">Linker</a></li><li><a href="Nx.html">Nx</a></li><li><a href="Pager.html">Pager</a></li><li><a href="Reflector.html">Reflector</a></li><li><a href="Relay.html">Relay</a></li><li><a href="RESTful.html">RESTful</a></li><li><a href="Singular.html">Singular</a></li><li><a href="Tx.html">Tx</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="tutorials.list.html" class="dropdown-toggle" data-toggle="dropdown">Tutorials<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="tutorial-demo-ui-ajax.html">demo-ui-ajax</a></li><li><a href="tutorial-najax-class.html">najax-class</a></li><li><a href="tutorial-najax-ex.html">najax-ex</a></li><li><a href="tutorial-najax-helper.html">najax-helper</a></li><li><a href="tutorial-najax-read.html">najax-read</a></li><li><a href="tutorial-relaylinker.html">relaylinker</a></li><li><a href="tutorial-rlk-standalone.html">rlk-standalone</a></li><li><a href="tutorial-static-history.html">static-history</a></li><li><a href="tutorial-static-najax-micro.html">static-najax-micro</a></li><li><a href="tutorial-static-najax.html">static-najax</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="global.html">Global</a></li>
				</ul>
			</li>
			
		</ul>
		<div class="col-sm-3 col-md-3">
            <form class="navbar-form" role="search">
                <div class="input-group">
                    <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
                    <div class="input-group-btn">
                        <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
                    </div>
                </div>
            </form>
        </div>
	</div>

</div>
</div>


<div class="container" id="toc-content">
<div class="row">

	
	<div class="col-md-8">
	
		<div id="main">
			

	<h1 class="page-title">Class: Nx</h1>
<section>

<header>
    
        <h2>
        Nx
        </h2>
        
    
</header>


<article>
    <div class="container-overview">
    
        
<hr>
<dt>
    <h4 class="name" id="Nx"><span class="type-signature"></span>new Nx(<span class="optional">opt</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Nx class. This class is created automatically by $najax various method.</p>
<table>
<thead>
<tr>
<th style="text-align:left">Method</th>
<th style="text-align:center">Default ver</th>
<th style="text-align:center">Tiny ver</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">All methods</td>
<td style="text-align:center">Yes</td>
<td style="text-align:center">Yes</td>
</tr>
</tbody>
</table>
<p><b>Specification</b><br></p>
<ul>
<li>Specify ajax request and response behaviors by <code>Nx object</code>.</li>
<li>Specify by Nx object's various method or <code>Nx <i>opt</i></code> method.</li>
<li>Begin ajax connection by <code>Nx <i>done</i></code>.</li>
<li><code>Nx <i>done</i></code> returns <code>Relay object</code>.</li>
<li><code>Relay</code> provide operating response-data, and bundling multiple <code>Relay</code>.</li>
<li><code>Nx</code> implement ajax by using <i>XMLHttpRequest</i>.</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>opt</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Nx options.</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>method</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'GET'
                
                </td>
            

            <td class="description last"><p>Method. GET / POST</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'json'
                
                </td>
            

            <td class="description last"><p>Response type.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>async</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>Enable async.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cache</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>Enable cache.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>retry</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Retry number.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>timeout</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Timeout ms.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>filter</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Response value filter.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>contentType</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'application/x-www-form-urlencoded'
                
                </td>
            

            <td class="description last"><p>Method POST option. It's possbile to specify <i>content-type</i>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>mime</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Mime by XHR.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>headers</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    {}
                
                </td>
            

            <td class="description last"><p>HTTP Headers.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>token</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'X-CSRF-Token'
                
                </td>
            

            <td class="description last"><p>HTTP Header of CSRF token.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>noescape</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>If true, not escape parameters. Apply to GET or POST parameters.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>jsonp</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Jsonp option.</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    ''
                
                </td>
            

            <td class="description last"><p>Jsonp callback function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'callback'
                
                </td>
            

            <td class="description last"><p>Jsonp callback variable name.</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>element</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Element</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'div'
                
                </td>
            

            <td class="description last"><p>Type html option. Root element or element tag name.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>iseval</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>Type script option. Determine to use <i>eval</i>. if false, use <i>function</i>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>separator</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    ','
                
                </td>
            

            <td class="description last"><p>Type csv option. Separator.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>auth</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Auth option.</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>user</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>User name.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pw</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Password.</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>relaymode</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    $najax.define.relaymode
                
                </td>
            

            <td class="description last"><p>Data relaymode. See $najax.define.relaymode for detail.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>clean</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>Clear object's values after completed.</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-180">line 180</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="$najax.html#.request">$najax.request</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).done();
$najax.post(url).param(vs).done();
$najax.raw(url).done(function(){ ... });
$najax.script(url).success(function(){ ... }).done(function(){ ... });

var rl = $najax.html(url).done();</pre>


    
</dd>

    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<hr>
<dt>
    <h4 class="name" id="abort"><span class="type-signature"></span>abort()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Abort ajax.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-929">line 929</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nx.abort();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="async"><span class="type-signature"></span>async(on)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set async or sync.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>on</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            

            

            <td class="description last"><p>Async flag.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>true</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-395">line 395</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).async(false).done();	//sync</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="auth"><span class="type-signature"></span>auth(user, pw)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set auth.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>user</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description last"><p>User name.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pw</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description last"><p>Password.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-669">line 669</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).auth(&#x27;user&#x27;, &#x27;password&#x27;).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="begin"><span class="type-signature"></span>begin(fn)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set begin function.</p>
<p><b>Function specification</b><br><br>Called before beginning ajax.</p>
<p><b>Function structure</b><br><br><code>function(xhr:XMLHttpRequest){ ... }</code> <code>this: <i>Relay object</i></code></p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>Begin function.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-730">line 730</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Nx.html#success">Nx#success</a></li>
			
			<li><a href="Nx.html#fail">Nx#fail</a></li>
			
			<li><a href="Nx.html#complete">Nx#complete</a></li>
			
			<li><a href="Nx.html#running">Nx#running</a></li>
			
			<li><a href="Nx.html#done">Nx#done</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).begin(function(){ ... }).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="cache"><span class="type-signature"></span>cache(on)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set cache behavior.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>on</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            

            

            <td class="description last"><p>Determine to cache.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>false</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-400">line 400</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).cache(true).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="clean"><span class="type-signature"></span>clean(on)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set clear behavior.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>on</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            

            

            <td class="description last"><p>Determine to clear. If true, clear object's values after completed.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>true</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-674">line 674</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Nx.html#clear">Nx#clear</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var nx = $najax.request(url).clean(false);nx.done();	//not clear</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="clear"><span class="type-signature"></span>clear()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Clear object's values after completed.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-945">line 945</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nx.clear();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="complete"><span class="type-signature"></span>complete(fn)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set complete function.</p>
<p><b>Function specification</b><br><br>Called after ajax completed, both success and fail.</p>
<p><b>Function structure</b><br><br><code>function(v:*, xhr:XMLHttpRequest){ ... }</code> <code>this: <i>Relay object</i></code></p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>Complete function.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-817">line 817</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Nx.html#begin">Nx#begin</a></li>
			
			<li><a href="Nx.html#success">Nx#success</a></li>
			
			<li><a href="Nx.html#fail">Nx#fail</a></li>
			
			<li><a href="Nx.html#running">Nx#running</a></li>
			
			<li><a href="Nx.html#done">Nx#done</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).complete(function(v, xhr){ ... }).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="contentType"><span class="type-signature"></span>contentType(contentType, mime)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set <i>content-type</i> and mime. Method POST option.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>contentType</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description last"><p>Content-type.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>mime</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description last"><p>Mime.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>'application/x-www-form-urlencoded'</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-516">line 516</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).contentType(&#x27;application/x-www-form-urlencoded&#x27;).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="done"><span class="type-signature"></span>done(<span class="optional">success</span>, <span class="optional">fail</span>, <span class="optional">complete</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set success / fail / complete, and begin ajax.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>success</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Success function. See <i>Nx.success</i>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fail</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Fail function. See <i>Nx.fail</i>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>complete</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Complete function. See <i>Nx.complete</i>.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-899">line 899</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Nx.html#begin">Nx#begin</a></li>
			
			<li><a href="Nx.html#success">Nx#success</a></li>
			
			<li><a href="Nx.html#fail">Nx#fail</a></li>
			
			<li><a href="Nx.html#complete">Nx#complete</a></li>
			
			<li><a href="Nx.html#running">Nx#running</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>Relay object.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Relay.html">Relay</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).done();
$najax.request(url).done(function{ ... });
$najax.request(url).done(null, function{ ... });
$najax.request(url).done(null, null, function{ ... });</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="fail"><span class="type-signature"></span>fail(fn)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set fail function.</p>
<p><b>Function specification</b><br><br>Called when ajax fail. ex: network error, 403, 404, 503 or any other HTTP error.</p>
<p><b>Function structure</b><br><br><code>function(state:number, xhr:XMLHttpRequest){ ... }</code> <code>this: <i>Relay object</i></code></p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>Fail function.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-788">line 788</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Nx.html#begin">Nx#begin</a></li>
			
			<li><a href="Nx.html#success">Nx#success</a></li>
			
			<li><a href="Nx.html#complete">Nx#complete</a></li>
			
			<li><a href="Nx.html#running">Nx#running</a></li>
			
			<li><a href="Nx.html#done">Nx#done</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).fail(function(state, xhr){ ... }).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="filter"><span class="type-signature"></span>filter(fn)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set filter function. It's possible to modify response-value.</p>
<p><b>Function specification</b><br><br>Called after recieving data and before making response-value.</p>
<p><b>Function structure</b><br><br><code>function(v:string){ return v; }</code></p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>Filter function.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-476">line 476</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).filter(function(v){ return v; }).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="header"><span class="type-signature"></span>header(w, <span class="optional">v</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set HTTP Headers.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>w</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>Name or assoc.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>v</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Value.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-543">line 543</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).header(&#x27;abc&#x27;, &#x27;ABC&#x27;).done();
$najax.request(url).header({abc: &#x27;ABC&#x27;}).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="jsonp"><span class="type-signature"></span>jsonp(<span class="optional">callback</span>, <span class="optional">name</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set jsonp option.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Jsonp callback function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'callback'
                
                </td>
            

            <td class="description last"><p>Jsonp callback variable name.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-481">line 481</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).type(&#x27;jsonp&#x27;).jsonp(&#x27;func&#x27;).done();
$najax.request(url).type(&#x27;jsonp&#x27;).jsonp(func).done();
$najax.request(url).type(&#x27;jsonp&#x27;).jsonp(func, &#x27;callback&#x27;).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="method"><span class="type-signature"></span>method(method)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set method. GET / POST</p>
<p><b>Method</b><br></p>
<p>| Method | Description | Related method or option |<br>| <code>GET(*)</code> | Http GET. | Nx.param<br>opt.noescape |<br>| <code>POST</code> | Http POST. | Nx.param<br>opt.noescape<br>opt.contentType |</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>method</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description last"><p>Method. GET / POST</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>'GET'</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-304">line 304</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).method(&#x27;get&#x27;).done();
$najax.request(url).method(&#x27;post&#x27;).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="opt"><span class="type-signature"></span>opt(w, <span class="optional">v</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set <i>opt</i> value.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>w</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>Name or assoc.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>v</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Value.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-711">line 711</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).opt(&#x27;noescape&#x27;, true).done();
$najax.request(url).opt(&#x27;relaymode&#x27;, 1).done();
$najax.request(url).opt({element: &#x27;div&#x27;}).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="param"><span class="type-signature"></span>param(w, <span class="optional">v</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set param. GET: URL parameters, POST: POST parameters.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>w</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>Name or assoc.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>v</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Value.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-362">line 362</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).param(&#x27;a&#x27;, 1).param(&#x27;b&#x27;, 1).done();
$najax.request(url).param({a: 1, b:2, c:3}).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="progress"><span class="type-signature"></span>progress(<span class="optional">download</span>, <span class="optional">upload</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set download and upload progress function.</p>
<p><b>Function structure</b><br><br><code>function(e:ProgressEvent, rate:number, xhr:XMLHttpRequest){ ... }</code> <code>rate: [0.0 - 1.0]</code></p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>download</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Download progress function.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>upload</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>Upload progress function.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-643">line 643</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).progress(dl, up).done();
$najax.request(url).progress(dl).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="relay"><span class="type-signature"></span>relay(w, <span class="optional">v</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set relay original data.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>w</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type"><a href="global.html#assoc">assoc</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>Name or assoc.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>v</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Value.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-693">line 693</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).relay(&#x27;a&#x27;, 1).relay(&#x27;b&#x27;, 2).done();
$najax.request(url).relay({a:1, b:2}).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="retry"><span class="type-signature"></span>retry(n)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set retry number.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>n</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            

            

            <td class="description last"><p>Retry number.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>null</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-418">line 418</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).retry(2).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="running"><span class="type-signature"></span>running(fn)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set running function.</p>
<p><b>Function specification</b><br><br>Called when begin(state=true) and complete(state=false).</p>
<p><b>Function structure</b><br><br><code>function(state:boolean){ ... }</code> <code>this: <i>Relay object</i></code></p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>Running function.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-846">line 846</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Nx.html#begin">Nx#begin</a></li>
			
			<li><a href="Nx.html#success">Nx#success</a></li>
			
			<li><a href="Nx.html#fail">Nx#fail</a></li>
			
			<li><a href="Nx.html#complete">Nx#complete</a></li>
			
			<li><a href="Nx.html#done">Nx#done</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).running(function(state){ ... }).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="success"><span class="type-signature"></span>success(fn)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set success function.</p>
<p><b>Function specification</b><br><br>Called when ajax succeed. ex: HTTP code 200.</p>
<p><b>Function structure</b><br><br><code>function(v:*, xhr:XMLHttpRequest){ ... }</code> <code>this: <i>Relay object</i></code></p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>fn</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>Success function.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-759">line 759</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Nx.html#begin">Nx#begin</a></li>
			
			<li><a href="Nx.html#fail">Nx#fail</a></li>
			
			<li><a href="Nx.html#complete">Nx#complete</a></li>
			
			<li><a href="Nx.html#running">Nx#running</a></li>
			
			<li><a href="Nx.html#done">Nx#done</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).success(function(v, xhr){ ... }).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="timeout"><span class="type-signature"></span>timeout(s)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set timeout ms.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>s</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            

            

            <td class="description last"><p>Timeout ms.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>null</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-451">line 451</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).timeout(500).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="token"><span class="type-signature"></span>token(<span class="optional">v</span>)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set CSRF token.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>v</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>CSRF token value.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-566">line 566</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).token(&#x27;Zvds1yfe.f3iF9y4FfsJeMJKlyqYdJ.duJgMi&#x27;).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="type"><span class="type-signature"></span>type(type)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set response type.</p>
<p><b>Response type</b><br></p>
<table>
<thead>
<tr>
<th style="text-align:left">Type</th>
<th style="text-align:left">Description</th>
<th style="text-align:left">Value type</th>
<th style="text-align:left">Related method or option</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>json(*)</code></td>
<td style="text-align:left">Json.</td>
<td style="text-align:left">assoc</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left"><code>raw</code></td>
<td style="text-align:left">Raw data.</td>
<td style="text-align:left">string</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left"><code>text</code></td>
<td style="text-align:left">Text. <i>text</i> is same as <i>raw</i>.</td>
<td style="text-align:left">string</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left"><code>html</code></td>
<td style="text-align:left">HTML.</td>
<td style="text-align:left">Element</td>
<td style="text-align:left">opt.element</td>
</tr>
<tr>
<td style="text-align:left"><code>script</code></td>
<td style="text-align:left">Execute script.</td>
<td style="text-align:left">null</td>
<td style="text-align:left">opt.iseval</td>
</tr>
<tr>
<td style="text-align:left"><code>func</code></td>
<td style="text-align:left">Function.</td>
<td style="text-align:left">function</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left"><code>jsonp</code></td>
<td style="text-align:left">Jsonp.</td>
<td style="text-align:left">null</td>
<td style="text-align:left">Nx.jsonp</td>
</tr>
<tr>
<td style="text-align:left"><code>csv</code></td>
<td style="text-align:left">Csv(Tsv).</td>
<td style="text-align:left">array</td>
<td style="text-align:left">opt.separator</td>
</tr>
<tr>
<td style="text-align:left"><code>xml</code></td>
<td style="text-align:left">Xml.</td>
<td style="text-align:left">XMLDocument</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left"><code>blob</code></td>
<td style="text-align:left">Blob.</td>
<td style="text-align:left">Blob</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left"><code><i>other</i></code></td>
<td style="text-align:left">XMLHttpRequest.responseType.</td>
<td style="text-align:left">Varies.</td>
<td style="text-align:left"></td>
</tr>
</tbody>
</table>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description last"><p>Response type.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	
	<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
	<dd class="tag-default">
		<ul class="dummy">
			<li>'json'</li>
		</ul>
	</dd>
	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-309">line 309</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).type(&#x27;raw&#x27;).done();
$najax.request(url).type(&#x27;html&#x27;).done();
$najax.request(url).type(&#x27;script&#x27;).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="upload"><span class="type-signature"></span>upload(v)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set upload object. Support Form(Element) and input(type=file)(Element), FormData.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>v</code></td>
            

            <td class="type">
            
                
<span class="param-type">Element</span>
|

<span class="param-type">FormData</span>



            
            </td>

            

            

            <td class="description last"><p>Form(Element) / input(type=file)(Element) / FormData.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-586">line 586</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(url).upload(input).done();
$najax.request(url).upload(form).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="url"><span class="type-signature"></span>url(url)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Set url.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description last"><p>URL.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-346">line 346</a>
			</li>
		</ul>
	</dd>
	

	
	<dt class="tag-tutorial method-doc-label method-doc-details-label">Tutorials:</dt>
	<dd class="tag-tutorial">
		<ul>
			<li><a href="tutorial-static-najax.html">static-najax</a></li>
			</ul>
	</dd>
	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Nx.html">Nx</a></span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">$najax.request(null).url(url).done();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="xhr"><span class="type-signature"></span>xhr()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>Get XHR object.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
		<ul class="dummy">
			<li>
				<a href="najax-core.js.html">najax-core.js</a>,
				 <a href="najax-core.js.html#sunlight-1-line-964">line 964</a>
			</li>
		</ul>
	</dd>
	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">XMLHttpRequest</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var nx = $najax.request(url);nx.done();
var xhr = nx.xhr();</pre>


    
</dd>

        </dl>
    

    

    
</article>

</section>




		</div>
	</div>

	<div class="clearfix"></div>

	
		<div class="col-md-3">
			<div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
		</div>
	

</div>
</div>

<div class="modal fade" id="searchResults">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">Search results</h4>
      </div>
      <div class="modal-body"></div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div>

<footer>

	&nbsp;


<span class="jsdoc-message">
	Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a>
	
	using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
</footer>

<script src="scripts/docstrap.lib.js"></script>
<script src="scripts/toc.js"></script>
<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>

<script>
$( function () {
	$( "[id*='$']" ).each( function () {
		var $this = $( this );

		$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
	} );

	$( ".tutorial-section pre, .readme-section pre" ).each( function () {
		var $this = $( this );

		var example = $this.find( "code" );
		exampleText = example.html();
		var lang = /{@lang (.*?)}/.exec( exampleText );
		if ( lang && lang[1] ) {
			exampleText = exampleText.replace( lang[0], "" );
			example.html( exampleText );
			lang = lang[1];
		} else {
			var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
			lang = langClassMatch ? langClassMatch[1] : "javascript";
		}

		if ( lang ) {

			$this
			.addClass( "sunlight-highlight-" + lang )
			.addClass( "linenums" )
			.html( example.html() );

		}
	} );

	Sunlight.highlightAll( {
		lineNumbers : true,
		showMenu : true,
		enableDoclinks : true
	} );

	$.catchAnchorLinks( {
        navbarOffset: 10
	} );
	$( "#toc" ).toc( {
		anchorName  : function ( i, heading, prefix ) {
			var id = $( heading ).attr( "id" );
			return id && id.replace(/\~/g, '-inner-').replace(/\./g, '-static-') || ( prefix + i );
		},
		selectors   : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
		showAndHide : false,
		smoothScrolling: true
	} );

	$( "#main span[id^='toc']" ).addClass( "toc-shim" );
	$( '.dropdown-toggle' ).dropdown();

    $( "table" ).each( function () {
      var $this = $( this );
      $this.addClass('table');
    } );

} );
</script>



<!--Navigation and Symbol Display-->


<!--Google Analytics-->


<script type="text/javascript">
	$(document).ready(function() {
		SearcherDisplay.init();
	});
</script>

</body>
</html>